<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<style>
		    * {
		        margin: 0px;
		        padding: 0px;
		    }
		
		    #d1 {
		        width: 800px;
		        width: 600px;
		        margin: 0 auto;
		        margin-top: 100px;
		    }
		
		    .clearfix:after {
		        clear: both;
		        display: table;
		        content: "";
		    }
		
		    #playclose {
		        float: left;
		        margin-left: 10px;
		        cursor: pointer;
		        font-size: 28px;
		        transform: rotate(45deg);
		        position: relative;
		        top: -1px
		       
		    }
		
		    #shijian {
		        float: left;
		        margin-left: 0px;
		        font-size: 12px
		    }
		
		    #skipbtn {
		        float: left;
		        margin-left: 10px;
		        color: deeppink;
		        cursor: pointer;
		        font-size: 12px
		    }
		
		    #skip {
		        color: white;
		        position: absolute;
		        left: 330px;
		        top: 350px;
		        width: 180px;
		        height: 20px;
		        background: black;
		        opacity: 0.8;
		        border-radius: 5px 5px 5px 5px;
		        line-height: 19px
		        
		    }
		
		</style>
		
		
		<div id="d1">
		    <video id="v1" src="https://image.wanda.cn/uploadfile/video/dalianzuqiujidi.mp4"
		        controls width="600" muted autoplay></video>
		
		    <div class="clearfix" id="skip">
		        <div id="playclose">+</div>
		        <div id="shijian"> 上次看到<span id="playtimediv"></span></div>
		        <div id="skipbtn">跳转播放</div>
		    </div>
		</div>
		
		<script>
		    var playTime = localStorage.playTime;
		    var minutes = Math.floor(((playTime % 86400) % 3600) / 60);
		    var seconds = Math.floor(((playTime % 86400) % 3600) % 60);
		    var duration = minutes + ":" + seconds
		    playtimediv.innerHTML = duration
		
		    skipbtn.onclick = function () {
		        if (playTime) {
		            v1.currentTime =playTime;
		            skip.style.display = "none";
		        }
		    }
		    playclose.onclick = function () {
		        skip.style.display = "none";
		    }
		    setInterval(f, 100);
		    function f() {
		        localStorage.playTime = v1.currentTime;
		    }
		</script>
	</body>
</html>
